package com.blockmeta.bbs.immodule.bean;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

import java.util.List;

public class HongbaoDetail implements Parcelable{


    /**
     * box_type : 1
     * candy_kids_list : [{"candy_num":1,"candy_type":1,"logo":"https://appsrc.8btc.com/1584088609753365688.png","user_id":365688,"user_name":"马路边一分钱"},{"candy_num":2,"candy_type":1,"logo":"https://bbtcdn.8btc.com/uc_server/data/avatar/000/36/96/56_avatar_middle.jpg","user_id":365689,"user_name":"听听看星星"},{"candy_num":3,"candy_type":1,"logo":"https://appserversrc.8btc.com/avatars/225008/20200227094036_225008.jpeg","user_id":365690,"user_name":"儀礼"}]
     * candy_num : 10
     * candy_type : 1
     * id : 1
     * remark : 大吉大利
     * status : 1
     * user_num : 3
     */

    @SerializedName("box_type")
    private int boxType;
    @SerializedName("candy_num")
    private int candyNum;
    @SerializedName("candy_type")
    private int candyType;
    @SerializedName("id")
    private int id;
    @SerializedName("message_id")
    private int messageId;
    @SerializedName("remark")
    private String remark;
    @SerializedName("status")
    private int status;
    @SerializedName("user_num")
    private int userNum;
    @SerializedName("candy_kids_list")
    private List<CandyKidsListBean> candyKidsList;


    protected HongbaoDetail(Parcel in) {
        boxType = in.readInt();
        candyNum = in.readInt();
        candyType = in.readInt();
        id = in.readInt();
        messageId = in.readInt();
        remark = in.readString();
        status = in.readInt();
        userNum = in.readInt();
        candyKidsList = in.createTypedArrayList(CandyKidsListBean.CREATOR);
    }

    public static final Creator<HongbaoDetail> CREATOR = new Creator<HongbaoDetail>() {
        @Override
        public HongbaoDetail createFromParcel(Parcel in) {
            return new HongbaoDetail(in);
        }

        @Override
        public HongbaoDetail[] newArray(int size) {
            return new HongbaoDetail[size];
        }
    };

    public int getBoxType() {
        return boxType;
    }

    public void setBoxType(int boxType) {
        this.boxType = boxType;
    }

    public int getCandyNum() {
        return candyNum;
    }

    public void setCandyNum(int candyNum) {
        this.candyNum = candyNum;
    }

    public int getCandyType() {
        return candyType;
    }

    public void setCandyType(int candyType) {
        this.candyType = candyType;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getRemark() {
        return remark;
    }

    public int getMessageId() {
        return messageId;
    }

    public void setMessageId(int messageId) {
        this.messageId = messageId;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public int getUserNum() {
        return userNum;
    }

    public void setUserNum(int userNum) {
        this.userNum = userNum;
    }

    public List<CandyKidsListBean> getCandyKidsList() {
        return candyKidsList;
    }

    public void setCandyKidsList(List<CandyKidsListBean> candyKidsList) {
        this.candyKidsList = candyKidsList;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(boxType);
        dest.writeInt(candyNum);
        dest.writeInt(candyType);
        dest.writeInt(id);
        dest.writeInt(messageId);
        dest.writeString(remark);
        dest.writeInt(status);
        dest.writeInt(userNum);
        dest.writeTypedList(candyKidsList);
    }


    public static class CandyKidsListBean implements Parcelable{
        /**
         * candy_num : 1
         * candy_type : 1
         * logo : https://appsrc.8btc.com/1584088609753365688.png
         * user_id : 365688
         * user_name : 马路边一分钱
         */

        @SerializedName("candy_num")
        private int candyNum;
        @SerializedName("candy_type")
        private int candyType;
        @SerializedName("logo")
        private String logo;
        @SerializedName("user_id")
        private int userId;
        @SerializedName("user_name")
        private String userName;

        protected CandyKidsListBean(Parcel in) {
            candyNum = in.readInt();
            candyType = in.readInt();
            logo = in.readString();
            userId = in.readInt();
            userName = in.readString();
        }

        public static final Creator<CandyKidsListBean> CREATOR = new Creator<CandyKidsListBean>() {
            @Override
            public CandyKidsListBean createFromParcel(Parcel in) {
                return new CandyKidsListBean(in);
            }

            @Override
            public CandyKidsListBean[] newArray(int size) {
                return new CandyKidsListBean[size];
            }
        };

        public int getCandyNum() {
            return candyNum;
        }

        public void setCandyNum(int candyNum) {
            this.candyNum = candyNum;
        }

        public int getCandyType() {
            return candyType;
        }

        public void setCandyType(int candyType) {
            this.candyType = candyType;
        }

        public String getLogo() {
            return logo;
        }

        public void setLogo(String logo) {
            this.logo = logo;
        }

        public int getUserId() {
            return userId;
        }

        public void setUserId(int userId) {
            this.userId = userId;
        }

        public String getUserName() {
            return userName;
        }

        public void setUserName(String userName) {
            this.userName = userName;
        }

        @Override
        public String toString() {
            return "CandyKidsListBean{" +
                    "candyNum=" + candyNum +
                    ", candyType=" + candyType +
                    ", logo='" + logo + '\'' +
                    ", userId=" + userId +
                    ", userName='" + userName + '\'' +
                    '}';
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeInt(candyNum);
            dest.writeInt(candyType);
            dest.writeString(logo);
            dest.writeInt(userId);
            dest.writeString(userName);
        }
    }
}
